function AgentCardOrder(params){ 
	 
}

AgentCardOrder.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new AgentCardOrder.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new AgentCardOrder.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new AgentCardOrder.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.id=function(id){if(this.proxy)return this.getProxy().id(id);  this.put("id", id);return this;};
	/** and id is null */
	this.idNull=function(){if(this.proxy)return this.getProxy().idNull();if(this.get("idNot")==null)this.put("idNot", "");this.put("id", null);return this;};
	/** not .... */
	this.idNot=function(){if(this.proxy)return this.getProxy().idNot();this.put("idNot", "not");return this;};
	this.idNotNull=function(){if(this.proxy)return this.getProxy().idNotNull();this.put("idNot", "not");this.put("id", null);return this;};
	this.idNot=function(id){if(this.proxy)return this.getProxy().idNot(id);this.put("idNot", "not");this.put("id", id);return this;};
		
	/** and id <= ? */
	this.idMin=function(min){if(this.proxy)return this.getProxy().idMin(min);this.put("idMin", min);return this;};
	/** and id >= ? */
	this.idMax=function(max){if(this.proxy)return this.getProxy().idMax(max);this.put("idMax", max);return this;};
		
		
	this.idIn=function(ids){
		if(this.proxy)return this.getProxy().idIn(ids);  this.put("idIn", ids);return this;
	};	
		 
	
	
	/** 订单编号        **/
	this.orderNumber=function(orderNumber){if(this.proxy)return this.getProxy().orderNumber(orderNumber);  this.put("orderNumber", orderNumber);return this;};
	/** and order_number is null */
	this.orderNumberNull=function(){if(this.proxy)return this.getProxy().orderNumberNull();if(this.get("orderNumberNot")==null)this.put("orderNumberNot", "");this.put("orderNumber", null);return this;};
	/** not .... */
	this.orderNumberNot=function(){if(this.proxy)return this.getProxy().orderNumberNot();this.put("orderNumberNot", "not");return this;};
	this.orderNumberNotNull=function(){if(this.proxy)return this.getProxy().orderNumberNotNull();this.put("orderNumberNot", "not");this.put("orderNumber", null);return this;};
	this.orderNumberNot=function(orderNumber){if(this.proxy)return this.getProxy().orderNumberNot(orderNumber);this.put("orderNumberNot", "not");this.put("orderNumber", orderNumber);return this;};
		
		 
	
	
	/** 所属品牌 [非空] [Merchant]      **/
	this.merchant=function(merchant){if(this.proxy)return this.getProxy().merchant(merchant);  this.put("merchant", merchant);return this;};
	/** and merchant is null */
	this.merchantNull=function(){if(this.proxy)return this.getProxy().merchantNull();if(this.get("merchantNot")==null)this.put("merchantNot", "");this.put("merchant", null);return this;};
	/** not .... */
	this.merchantNot=function(){if(this.proxy)return this.getProxy().merchantNot();this.put("merchantNot", "not");return this;};
	this.merchantNotNull=function(){if(this.proxy)return this.getProxy().merchantNotNull();this.put("merchantNot", "not");this.put("merchant", null);return this;};
	this.merchantNot=function(merchant){if(this.proxy)return this.getProxy().merchantNot(merchant);this.put("merchantNot", "not");this.put("merchant", merchant);return this;};
		
		
	this.merchantIn=function(ids){
		if(this.proxy)return this.getProxy().merchantIn(ids);  this.put("merchantIn", ids);return this;
	};	
		 
	
	
	/** 用户编号        **/
	this.uid=function(uid){if(this.proxy)return this.getProxy().uid(uid);  this.put("uid", uid);return this;};
	/** and uid is null */
	this.uidNull=function(){if(this.proxy)return this.getProxy().uidNull();if(this.get("uidNot")==null)this.put("uidNot", "");this.put("uid", null);return this;};
	/** not .... */
	this.uidNot=function(){if(this.proxy)return this.getProxy().uidNot();this.put("uidNot", "not");return this;};
	this.uidNotNull=function(){if(this.proxy)return this.getProxy().uidNotNull();this.put("uidNot", "not");this.put("uid", null);return this;};
	this.uidNot=function(uid){if(this.proxy)return this.getProxy().uidNot(uid);this.put("uidNot", "not");this.put("uid", uid);return this;};
		
		 
	
	
	/** 用户名称        **/
	this.nickName=function(nickName){if(this.proxy)return this.getProxy().nickName(nickName);  this.put("nickName", nickName);return this;};
	/** and nick_name is null */
	this.nickNameNull=function(){if(this.proxy)return this.getProxy().nickNameNull();if(this.get("nickNameNot")==null)this.put("nickNameNot", "");this.put("nickName", null);return this;};
	/** not .... */
	this.nickNameNot=function(){if(this.proxy)return this.getProxy().nickNameNot();this.put("nickNameNot", "not");return this;};
	this.nickNameNotNull=function(){if(this.proxy)return this.getProxy().nickNameNotNull();this.put("nickNameNot", "not");this.put("nickName", null);return this;};
	this.nickNameNot=function(nickName){if(this.proxy)return this.getProxy().nickNameNot(nickName);this.put("nickNameNot", "not");this.put("nickName", nickName);return this;};
		
		 
	
	
	/** 用户 [非空] [Member]      **/
	this.member=function(member){if(this.proxy)return this.getProxy().member(member);  this.put("member", member);return this;};
	/** and member is null */
	this.memberNull=function(){if(this.proxy)return this.getProxy().memberNull();if(this.get("memberNot")==null)this.put("memberNot", "");this.put("member", null);return this;};
	/** not .... */
	this.memberNot=function(){if(this.proxy)return this.getProxy().memberNot();this.put("memberNot", "not");return this;};
	this.memberNotNull=function(){if(this.proxy)return this.getProxy().memberNotNull();this.put("memberNot", "not");this.put("member", null);return this;};
	this.memberNot=function(member){if(this.proxy)return this.getProxy().memberNot(member);this.put("memberNot", "not");this.put("member", member);return this;};
		
		
	this.memberIn=function(ids){
		if(this.proxy)return this.getProxy().memberIn(ids);  this.put("memberIn", ids);return this;
	};	
		 
	
	
	/** 代理卡  [AgentConf]      **/
	this.agentCard=function(agentCard){if(this.proxy)return this.getProxy().agentCard(agentCard);  this.put("agentCard", agentCard);return this;};
	/** and agent_card is null */
	this.agentCardNull=function(){if(this.proxy)return this.getProxy().agentCardNull();if(this.get("agentCardNot")==null)this.put("agentCardNot", "");this.put("agentCard", null);return this;};
	/** not .... */
	this.agentCardNot=function(){if(this.proxy)return this.getProxy().agentCardNot();this.put("agentCardNot", "not");return this;};
	this.agentCardNotNull=function(){if(this.proxy)return this.getProxy().agentCardNotNull();this.put("agentCardNot", "not");this.put("agentCard", null);return this;};
	this.agentCardNot=function(agentCard){if(this.proxy)return this.getProxy().agentCardNot(agentCard);this.put("agentCardNot", "not");this.put("agentCard", agentCard);return this;};
		
		
	this.agentCardIn=function(ids){
		if(this.proxy)return this.getProxy().agentCardIn(ids);  this.put("agentCardIn", ids);return this;
	};	
		 
	
	
	/** formId        **/
	this.formid=function(formid){if(this.proxy)return this.getProxy().formid(formid);  this.put("formid", formid);return this;};
	/** and formid is null */
	this.formidNull=function(){if(this.proxy)return this.getProxy().formidNull();if(this.get("formidNot")==null)this.put("formidNot", "");this.put("formid", null);return this;};
	/** not .... */
	this.formidNot=function(){if(this.proxy)return this.getProxy().formidNot();this.put("formidNot", "not");return this;};
	this.formidNotNull=function(){if(this.proxy)return this.getProxy().formidNotNull();this.put("formidNot", "not");this.put("formid", null);return this;};
	this.formidNot=function(formid){if(this.proxy)return this.getProxy().formidNot(formid);this.put("formidNot", "not");this.put("formid", formid);return this;};
		
		 
	
	
	/** 支付金额 [非空]       **/
	this.payMoney=function(payMoney){if(this.proxy)return this.getProxy().payMoney(payMoney);  this.put("payMoney", payMoney);return this;};
	/** and pay_money is null */
	this.payMoneyNull=function(){if(this.proxy)return this.getProxy().payMoneyNull();if(this.get("payMoneyNot")==null)this.put("payMoneyNot", "");this.put("payMoney", null);return this;};
	/** not .... */
	this.payMoneyNot=function(){if(this.proxy)return this.getProxy().payMoneyNot();this.put("payMoneyNot", "not");return this;};
	this.payMoneyNotNull=function(){if(this.proxy)return this.getProxy().payMoneyNotNull();this.put("payMoneyNot", "not");this.put("payMoney", null);return this;};
	this.payMoneyNot=function(payMoney){if(this.proxy)return this.getProxy().payMoneyNot(payMoney);this.put("payMoneyNot", "not");this.put("payMoney", payMoney);return this;};
		
	/** and pay_money <= ? */
	this.payMoneyMin=function(min){if(this.proxy)return this.getProxy().payMoneyMin(min);this.put("payMoneyMin", min);return this;};
	/** and pay_money >= ? */
	this.payMoneyMax=function(max){if(this.proxy)return this.getProxy().payMoneyMax(max);this.put("payMoneyMax", max);return this;};
		
		 
	
	
	/** 支付时间 [非空]       **/
	this.payTime=function(payTime){if(this.proxy)return this.getProxy().payTime(payTime);  this.put("payTime", payTime);return this;};
	/** and pay_time is null */
	this.payTimeNull=function(){if(this.proxy)return this.getProxy().payTimeNull();if(this.get("payTimeNot")==null)this.put("payTimeNot", "");this.put("payTime", null);return this;};
	/** not .... */
	this.payTimeNot=function(){if(this.proxy)return this.getProxy().payTimeNot();this.put("payTimeNot", "not");return this;};
	this.payTimeNotNull=function(){if(this.proxy)return this.getProxy().payTimeNotNull();this.put("payTimeNot", "not");this.put("payTime", null);return this;};
	this.payTimeNot=function(payTime){if(this.proxy)return this.getProxy().payTimeNot(payTime);this.put("payTimeNot", "not");this.put("payTime", payTime);return this;};
		
	/** and pay_time >= ? */
	this.payTimeStart=function(start){if(this.proxy)return this.getProxy().payTimeStart(start);this.put("payTimeStart", start);return this;};			
	/** and pay_time <= ? */
	this.payTimeEnd=function(end){if(this.proxy)return this.getProxy().payTimeEnd(end);this.put("payTimeEnd", end);return this;};
		
		 
	
	
	/** 支付状态 [非空]   1:未支付 2:已支付     **/
	this.payStatus=function(payStatus){if(this.proxy)return this.getProxy().payStatus(payStatus);  this.put("payStatus", payStatus);return this;};
	/** and pay_status is null */
	this.payStatusNull=function(){if(this.proxy)return this.getProxy().payStatusNull();if(this.get("payStatusNot")==null)this.put("payStatusNot", "");this.put("payStatus", null);return this;};
	/** not .... */
	this.payStatusNot=function(){if(this.proxy)return this.getProxy().payStatusNot();this.put("payStatusNot", "not");return this;};
	this.payStatusNotNull=function(){if(this.proxy)return this.getProxy().payStatusNotNull();this.put("payStatusNot", "not");this.put("payStatus", null);return this;};
	this.payStatusNot=function(payStatus){if(this.proxy)return this.getProxy().payStatusNot(payStatus);this.put("payStatusNot", "not");this.put("payStatus", payStatus);return this;};
		
		
	this.payStatusIn=function(ids){
		if(this.proxy)return this.getProxy().payStatusIn(ids);  this.put("payStatusIn", ids);return this;
	};	
		 
	
	
	/** 修改时间 [非空]       **/
	this.updateTime=function(updateTime){if(this.proxy)return this.getProxy().updateTime(updateTime);  this.put("updateTime", updateTime);return this;};
	/** and update_time is null */
	this.updateTimeNull=function(){if(this.proxy)return this.getProxy().updateTimeNull();if(this.get("updateTimeNot")==null)this.put("updateTimeNot", "");this.put("updateTime", null);return this;};
	/** not .... */
	this.updateTimeNot=function(){if(this.proxy)return this.getProxy().updateTimeNot();this.put("updateTimeNot", "not");return this;};
	this.updateTimeNotNull=function(){if(this.proxy)return this.getProxy().updateTimeNotNull();this.put("updateTimeNot", "not");this.put("updateTime", null);return this;};
	this.updateTimeNot=function(updateTime){if(this.proxy)return this.getProxy().updateTimeNot(updateTime);this.put("updateTimeNot", "not");this.put("updateTime", updateTime);return this;};
		
	/** and update_time >= ? */
	this.updateTimeStart=function(start){if(this.proxy)return this.getProxy().updateTimeStart(start);this.put("updateTimeStart", start);return this;};			
	/** and update_time <= ? */
	this.updateTimeEnd=function(end){if(this.proxy)return this.getProxy().updateTimeEnd(end);this.put("updateTimeEnd", end);return this;};
		
		 
	
	
	/** 添加时间 [非空]       **/
	this.addTime=function(addTime){if(this.proxy)return this.getProxy().addTime(addTime);  this.put("addTime", addTime);return this;};
	/** and add_time is null */
	this.addTimeNull=function(){if(this.proxy)return this.getProxy().addTimeNull();if(this.get("addTimeNot")==null)this.put("addTimeNot", "");this.put("addTime", null);return this;};
	/** not .... */
	this.addTimeNot=function(){if(this.proxy)return this.getProxy().addTimeNot();this.put("addTimeNot", "not");return this;};
	this.addTimeNotNull=function(){if(this.proxy)return this.getProxy().addTimeNotNull();this.put("addTimeNot", "not");this.put("addTime", null);return this;};
	this.addTimeNot=function(addTime){if(this.proxy)return this.getProxy().addTimeNot(addTime);this.put("addTimeNot", "not");this.put("addTime", addTime);return this;};
		
	/** and add_time >= ? */
	this.addTimeStart=function(start){if(this.proxy)return this.getProxy().addTimeStart(start);this.put("addTimeStart", start);return this;};			
	/** and add_time <= ? */
	this.addTimeEnd=function(end){if(this.proxy)return this.getProxy().addTimeEnd(end);this.put("addTimeEnd", end);return this;};
		
		 
	
	
	/** 状态 [非空]   1:正常 0:无效     **/
	this.status=function(status){if(this.proxy)return this.getProxy().status(status);  this.put("status", status);return this;};
	/** and status is null */
	this.statusNull=function(){if(this.proxy)return this.getProxy().statusNull();if(this.get("statusNot")==null)this.put("statusNot", "");this.put("status", null);return this;};
	/** not .... */
	this.statusNot=function(){if(this.proxy)return this.getProxy().statusNot();this.put("statusNot", "not");return this;};
	this.statusNotNull=function(){if(this.proxy)return this.getProxy().statusNotNull();this.put("statusNot", "not");this.put("status", null);return this;};
	this.statusNot=function(status){if(this.proxy)return this.getProxy().statusNot(status);this.put("statusNot", "not");this.put("status", status);return this;};
		
		
	this.statusIn=function(ids){
		if(this.proxy)return this.getProxy().statusIn(ids);  this.put("statusIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有代理卡订单 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/agents/agencycardorder.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取代理卡订单分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/agents/agencycardorder.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取代理卡订单 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/agents/agencycardorder.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

AgentCardOrder.get = function(id){
	var protocol = ux.ajax("/admin/agents/agencycardorder.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.agentCardOrder;
	return null;
}

AgentCardOrder.where = new AgentCardOrder.Where(0,true);